﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Globalization;

namespace Wicresoft.SMS.Web
{
    public static class CultureProvider
    {
        //public const string cultureprefix = "gl-";
        public const string culturecookiekey = "Lang";
        public const string culturedefault = "en-us";

        public static CultureInfo GetCultureInfo(string ci)
        {
            try
            {
                //return new CultureInfo(ci.Substring(cultureprefix.Length, ci.Length - cultureprefix.Length));
                return new CultureInfo(ci);
            }
            catch
            {
                return null;
            }
        }

        public static string GetCurrentCultureString()
        {
            return CultureInfo.CurrentUICulture.Name.ToLower();
        }

    }
}